package com.cruise.game.model.param.order;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 创建订单参数
 * 
 * @author cruise
 * @date 2025-02-28
 */
@Data
public class CreateOrderParam implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 服务ID
     */
    @NotNull(message = "服务ID不能为空")
    private Long serviceId;

    /**
     * 账号类型
     */
    @NotBlank(message = "账号类型不能为空")
    private String accountType;

    /**
     * 游戏账号用户名
     */
    @NotBlank(message = "游戏账号用户名不能为空")
    private String accountUsername;

    /**
     * 游戏账号密码
     */
    @NotBlank(message = "游戏账号密码不能为空")
    private String accountPassword;

    /**
     * 任务描述
     */
    private String taskDescription;

    /**
     * 预期完成时间
     */
    @Future(message = "预期完成时间必须是将来时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", shape = JsonFormat.Shape.STRING, timezone = "GMT+8")
    private LocalDateTime expectedCompletionTime;
}
